#pragma once
#include "board.h"
#include "pos.h"

#include <iostream>

#define CLASSIC 1
#define SPEED	2


class checkers
{
protected:

	//AInteligence *checkersAI;

	//void initAI();
	void initWhite();
	void initBlack();
	void addRightNormal(int x, int y, bool isWhite);
	void addLeftNormal(int x, int y, bool isWhite);
	void addRightAggressive(int x, int y, bool isWhite, vect orgin, int recur, vector<vect>allCasualities, int level);
	void addLeftAggressive(int x, int y, bool isWhite, vect orgin, int recur, vector<vect>allCasualties, int level);
	void addRBackAggressive(int x, int y, bool isWhite, vect orgin, int recur, vector<vect>allCasualties, int level);
	void addLBackAggressive(int x, int y, bool isWhite, vect orgin, int recur, vector<vect>allCasualties, int level);

	void addRightKing(int x, int y, vect orign, int recur, bool isWhite, vector<vect>allCasualties, int level, bool zakret);
	void addRightBackKing(int x, int y, vect orign, int recur, bool isWhite, vector<vect>allCasualties, int level, bool zakret);
	void addLeftKing(int x, int y, vect orign, int recur, bool isWhite, vector<vect>allCasualties, int level, bool zakret);
	void addLeftBackKing(int x, int y, vect orign, int recur, bool isWhite, vector<vect>allCasualties, int level, bool zakret);
	void switchToKing(void);
	bool clairvoyant(pos2 posMove);
	
public:
	/**
	* @brief pole okreslajace czy toczy sie gra pvp.
	*/
	bool pvp;
	bool gameStatus;
	int gameType;
	int whites;
	int blacks;
	int win;
	/**
	* @brief pole opisujace aktualna strone.
	*/
	int actSide;
	/**
	* @brief wskaznik do obiektu klasy board.
	*/
	board *wskBoard;
	checkers(bool isAI);
	~checkers(void);
	void findMoves();
	void moveTo(int x, int y);
	void switchSide(void);
	void moveAI(void);
	bool is2rows;




	


	
	
	bool clairvoyant2(pos2 pm);
	void newGame(int type);
};
